# 实现mysql server允许从远端以root身份登录

echo "
root:>mysql -u root -p 
use mysql;
grant all privileges  on *.* to root@'%' identified by "todayGood123";

#添加远程登录用户
CREATE USER 'liaozesong'@'%' IDENTIFIED WITH mysql_native_password BY 'Lzslov123!';
GRANT ALL PRIVILEGES ON *.* TO 'liaozesong'@'%';

flush privileges;



select host,user from user;
"

docker exec -it mysql bash 

